home *** CD-ROM | disk | FTP | other *** search
/ Freelog 38 / Freelog038.iso / Bas / Bureautique / Ntl480 / Setup.exe / {app} / Libraries / Euro.clb < prev    next >
Text File  |  2002-06-10  |  3KB  |  101 lines

  1. = V5 MultiLine NoSorting TabWidth=30
  2.  
  3. H=";About this library"
  4. This library was written by Fookes Software to serve as a demonstration of the varied tasks that can be performed by the Editor Clipbook. You are free to customize it any way you like!
  5.  
  6. If you have a useful Clipbook library that you would like to share with other NoteTab users, please submit it to: <clipbook@fookes.com>. Your library will then be added to the Clipbook repository on the web.
  7.  
  8.  
  9. H=";Instructions"
  10. Convert between any currency using the Euro currency as reference.
  11.  
  12. Activate the "Euro Exchange" Clip to open the wizard. The two lists in the Clip wizard display all the "Euro" currencies and a few others. You can also enter a currency that is not listed. The Clip wizard will prompt you to indicate the current exchange rate if you select a non-Euro currency.
  13.  
  14.  
  15.  
  16. H=";"
  17.  
  18.  
  19. H=";-----------------------------"
  20.  
  21.  
  22. H="Euro Exchange"
  23. ^!Set %Amount%=^?[Amount to convert=1]
  24. ^!Set %ConvertFrom%=^?[Currency=_Euro^=EU|German marks^=DM|French francs^=FF|Italian lire^=IL|Spanish pesetas^=SP|Dutch guilders^=DG|Belgian francs^=BF|Austrian schillings^=AS|Portuguese escudos^=PE|Finnish markka^=FM|Irish punts^=IP|Luxembourg francs^=LF|US dollars (prompts for current rate)^=US dollars|Swiss francs (prompts for current rate)^=Swiss francs|Japanese yen (prompts for current rate)^=Japanese yen]
  25. ^!Set %ConvertTo%=^?[Convert to=Euro^=EU|_German marks^=DM|French francs^=FF|Italian lire^=IL|Spanish pesetas^=SP|Dutch guilders^=DG|Belgian francs^=BF|Austrian schillings^=AS|Portuguese escudos^=PE|Finnish markka^=FM|Irish punts^=IP|Luxembourg francs^=LF|US dollars (prompts for current rate)^=US dollars|British pounds (prompts for current rate)^=British pounds|Swiss francs (prompts for current rate)^=Swiss francs|Japanese yen (prompts for current rate)^=Japanese yen]
  26. ^!Clip "Get Rate" ^%ConvertFrom%
  27. ^!Set %ConvertFrom%=^%Currency%
  28. ;following converts to Euros
  29. ^!Set %Value%=^$Calc(^%Amount%/^%Rate%;8)$
  30. ^!Clip "Get Rate" ^%ConvertTo%
  31. ^!Set %ConvertTo%=^%Currency%
  32. ;following converts to chosen currency
  33. ^!Set %Value%=^$Calc(^%Value%*^%Rate%;2)$
  34.  
  35. ^!Info ^%Amount% ^%ConvertFrom% = ^%Value% ^%ConvertTo%
  36.  
  37. H=";-----------------------------"
  38.  
  39.  
  40. H=";"
  41.  
  42.  
  43. H="_Get Rate"
  44. ;Rate for one Euro
  45.  
  46. ^!Set %CurrencyCode%=^&
  47. ^!IfLabelExist ^%CurrencyCode% ^%CurrencyCode% ELSE Unknown
  48.  
  49. :Unknown
  50. ^!Set %Currency%=^%CurrencyCode%; %Rate%=^?{How many ^%CurrencyCode% for 1 Euro?}
  51. ^!IfTrue ^$IsEmpty(^%Rate%)$ Exit
  52. ^!If ^%Rate% = 0 Exit
  53. ^!Goto End
  54.  
  55. :EU
  56. ^!Set %Currency%=Euro; %Rate%=1.0
  57. ^!Goto End
  58.  
  59. :DM
  60. ^!Set %Currency%=German marks; %Rate%=1.95583
  61. ^!Goto End
  62.  
  63. :FF
  64. ^!Set %Currency%=French francs; %Rate%=6.55957
  65. ^!Goto End
  66.  
  67. :IL
  68. ^!Set %Currency%=Italian lire; %Rate%=1936.27
  69. ^!Goto End
  70.  
  71. :SP
  72. ^!Set %Currency%=Spanish pesetas; %Rate%=166.386
  73. ^!Goto End
  74.  
  75. :DG
  76. ^!Set %Currency%=Dutch guilders; %Rate%=2.20371
  77. ^!Goto End
  78.  
  79. :BF
  80. ^!Set %Currency%=Belgian francs; %Rate%=40.3399
  81. ^!Goto End
  82.  
  83. :AS
  84. ^!Set %Currency%=Austrian schillings; %Rate%=13.7603
  85. ^!Goto End
  86.  
  87. :PE
  88. ^!Set %Currency%=Portuguese escudos; %Rate%=200.482
  89. ^!Goto End
  90.  
  91. :FM
  92. ^!Set %Currency%=Finnish markka; %Rate%=5.94573
  93. ^!Goto End
  94.  
  95. :IP
  96. ^!Set %Currency%=Irish punts; %Rate%=0.78756
  97. ^!Goto End
  98.  
  99. :LF
  100. ^!Set %Currency%=Luxembourg francs; %Rate%=40.3399
  101.